package model

import "time"

//userId + collectionIndex可以唯一确定一条记录
//supplies是已经铸造数量,counter是已领取数量
//CollectionIndex为集合ID,sub_collection_index是子集合ID
type CollectionDetail struct {
	Id                 int       `orm:"column(id);type(int);index;pk;auto"`
	UserId             int       `orm:"column(user_id);type(int);index;"`
	CollectionIndex    string    `orm:"column(collection_index);size(64);"`
	SubCollectionIndex int       `orm:"column(sub_collection_index);type(int)"`
	CollectionName     string    `orm:"column(collection_name);size(64)"`
	CollectionStatus   int       `orm:"column(collection_status);type(int);"`
	Supplies           int       `orm:"column(supplies);type(int);"`
	Counter            int       `orm:"column(counter);type(int);"`
	TokenId            int       `orm:"column(token_id);type(int);"`
	CreatedTime        time.Time `orm:"column(created_time);type(datetime)"`
	SaleTime           time.Time `orm:"column(sale_time);type(datetime)"`
	OffShelfTime       time.Time `orm:"column(off_shelf_time);type(datetime)"`
	Issuer             string    `orm:"column(issuer);size(64)"`
	NumberOfFavorites  int       `orm:"column(number_of_favorites);type(int)"`
	Currency           string    `orm:"column(currency);size(10)"`
	Price              float64   `orm:"column(price);digits(17);decimals(2)"`
	CoverUrl           string    `orm:"column(cover_url);size(128)"`
}
